package ma.controller.panels.parameterpanels;

import ma.controller.gui.Controllable;
import ma.controller.panels.auxillary.CtrInformationPanel;
import ma.model.ManufacturingMethodInterface;

/**
 * A {@code CtrParamPanel} controls the behavior of a parameter
 * panel. This can be input or output parameters.
 * @author Oliver Eckstein
 *
 */
public abstract class CtrParamPanel implements Controllable {
    
    protected ManufacturingMethodInterface manuMethod;    
    protected CtrInformationPanel infoPanelCtr;    
    
    public CtrParamPanel(
            ManufacturingMethodInterface manuMethod,
            CtrInformationPanel infoPanelCtr) {
        
        this.manuMethod = manuMethod;
        this.infoPanelCtr = infoPanelCtr;
        createView();
        init();
    }
    
    /**
     * To add parameter panels to the view. This method is just for the
     * parameters that have been created in the model when creating a new
     * instance of it. It should only be called once.
     */
    protected abstract void init();
    
    protected abstract void createView();
}
